<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    <div id="demo"></div>
    <script src="../../js/jquery-3.2.1.js"></script>
    <script>
        window.addEventListener('message', function (event) {
            if(event.origin !=='http://127.0.0.1:8080') return
            $('#demo').text(event.data)
            event.source.postMessage('ok', event.origin+'/跨文档操作/iframe/send.html');
        }, false);
    </script>
</body>

</html>